﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DishesList.ascx.cs"
    Inherits="BuXiaChu.OrderDishes.Web.Admin.Modules.Restaurant.DishesList" %>
<%@ Register TagName="Tag" TagPrefix="PageBar" Src="~/Modules/PageBar.ascx" %>
<table>
    <tr>
        <td>
            菜品编码
        </td>
        <td>
            名称
        </td>
        <td>
            类别
        </td>
        <td>
            单价
        </td>
        <td>
            单位
        </td>
        <td>
            折扣比
        </td>
        <td>
            开发票折扣比
        </td>
        <td>
            状态
        </td>
        <td>
            操作
        </td>
    </tr>
    <% foreach (var item in PageDataList)
       {%>
    <tr>
        <td>
            <%= item.CodeId %>
        </td>
        <td>
            <%= HttpUtility.HtmlEncode(item.Name)%>
        </td>
        <td>
            <%= GetDishesCatName(item.CatID)%>
        </td>
        <td>
            <%= item.Price%>
        </td>
        <td>
            <%= item.Unit%>
        </td>
        <td>
            <%= item.Discount%>
        </td>
        <td>
            <%= item.InvoiceDiscount%>
        </td>
        <td>
            <%= item.Status==255?"已删除":"正常"%>
        </td>
        <td>
            <a href="AddDishes.aspx?id=<%=item.CodeId %>&RestaurantId=<%= item.RestaurantId%>">修改</a>
            <span>|</span> <a href="javascript:;" onclick="deleteDishes(<%=item.CodeId %>)">删除</a>
        </td>
    </tr>
    <%} %>
</table>
<PageBar:Tag runat="server" ID="PageBarBottom" />
<% 
    PageBarBottom.PbModel.IsForAjax = true;
    PageBarBottom.PbModel.Size = 20;
    PageBarBottom.PbModel.AjaxPageClickCallback = "searchDishes({index})";
%>